<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
<title>签写留言</title>
<style>
.dhead{
	margin:0 auto;
	width:754px;
	height:57px;
	background:url("images/b_03.jpg") no-repeat;
}
#ddiv{
	margin:0 auto;
	width:754px;
	background:url("images/a_05.jpg") repeat-y;
}
.dcon{
	width:754px;
	padding-top:20px;
	padding-left:200px;
}
.dfoot{
	margin:0 auto;
	width:754px;
	height:35px;
	background:url("images/a_07.jpg") no-repeat;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
	$("#button").click(function(){
		$.post("index.php",$("#form1").serialize(),function(data){
			 $("#ddiv").append("<div class='dcon'>标题："+data.title+"<br/>用户名："+data.username+"<br/>留言内容："+data.content);     // 将用户提交的用户名与留言内容显示
		},"json");
	})
})
</script>
</head>

<body>
<table width="761" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FEFEFE" bgcolor="#FFFFFF">
  <form action=""  method="post" name="form1" id="form1">
    <tr>
      <td width="761" align="center" bgcolor="#F9F8EF"><table width="749" border="0" align="center" cellpadding="0"  cellspacing="0"  style="BORDER-COLLAPSE: collapse">
        <tr>
          <td width="749" height="57" background="images/a_03.jpg">&nbsp;&nbsp;</td>
        </tr>
        <tr>
          <td height="36" colspan="3" align="left" background="images/a_05.jpg" bgcolor="#F9F8EF" scope="col">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;姓&nbsp;&nbsp;名：
            <input  name="username" id="username" value=" " maxlength="64" type="text" />
                </td>
        </tr>
        <tr>
          <td height="36" colspan="3" align="left" background="images/a_05.jpg" bgcolor="#F9F8EF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;标　题：
            <input maxlength="64" size="30" name="title"  type="text"/>
                </td>
        </tr>
        <tr>
          <td height="126" colspan="3" align="left" background="images/a_05.jpg" bgcolor="#F9F8EF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;内&nbsp;&nbsp;容：
            <textarea name="content" cols="60" rows="8" id="content" style="background:url(./images/mrbccd.gif)"></textarea>
               
				 <table width="734" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="703" height="40" align="center"><input name="button" type="button" id="button" value="填写留言"/>
            </tr>
        </table>
				</td>
        </tr>
       
      
        <tr>
          <td height="35" background="images/a_07.jpg">&nbsp;&nbsp;</td>
        </tr>
      </table>
	  
	  </td>
    </tr>
    </form>
  </table>

<div class="dhead"></div>
<div id="ddiv"></div>
<div class="dfoot"></div>
  
</body>
</html>
